package com.lion.ball.app.pages.tabs.main.mine;

import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;

import com.lion.ball.app.models.admin.UserBaseInfoResult;

import javax.inject.Inject;

/**
 * 响应式数据持有者
 */
public class MineViewModel extends ViewModel {

    private MutableLiveData<String> mText;
    private MutableLiveData<UserBaseInfoResult> userInfo;

    @Inject
    public MineViewModel() {
        mText = new MutableLiveData<>();
        userInfo = new MutableLiveData<>();
        mText.setValue("控件");
    }

    public LiveData<String> getText() {
        return mText;
    }

    public void setText(String text) {
        this.mText.setValue(text);
    }

    public MutableLiveData<UserBaseInfoResult> getUserInfo() {
        return userInfo;
    }

    public void setUserInfo(UserBaseInfoResult userInfo) {
        this.userInfo.setValue(userInfo);
    }
}